package com.neusoft.neu.fy25g01.n98.entity;

import lombok.Data;


public enum ResultCode {
    SUCCESS(200, "success"),
    FIND_SUCCESS(201, "查找成功"),
    MOD_SUCCESS(202, "修改成功"),
    ADD_SUCCESS(203, "添加成功"),
    DEL_SUCCESS(204, "删除成功"),
    FAIL(500, "失败"),
    NOT_FOUND(404, "未找到"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_ACCEPTABLE(406, "不接受"),
    REQUEST_TIMEOUT(408, "请求超时"),
    CONFLICT(409, "冲突"),
    UNSUPPORTED_MEDIA_TYPE(415, "不支持的媒体类型"),
    INTERNAL_SERVER_ERROR(501, "服务器内部错误"),
    DELETE_FAIL_FOR_NOTEXISTS(503, "因为指定的资源不存在，所以无法删除"),
    INTERNAL_SERVER_ERROR_MSG(502, "服务器内部错误信息"),
    DATA_NOT_ENOUGH(504, "客户端未提供足够的数据"),
    UPDATE_FAIL_FOR_NOTEXISTS(505, "因为指定的资源不存在，所以无法修改");
    private int code;
    private String msg;

    private ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
